Optimal. Leaf size=80 \[ -\frac{\sqrt{a+b x^2} (A+2 B x)}{2 x^2}-\frac{A b \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )}{2 \sqrt{a}}+\sqrt{b} B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0604033, antiderivative size = 80, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.35, Rules used = {811, 844, 217, 206, 266, 63, 208} \[ -\frac{\sqrt{a+b x^2} (A+2 B x)}{2 x^2}-\frac{A b \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )}{2 \sqrt{a}}+\sqrt{b} B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 811
Rule 844
Rule 217
Rule 206
Rule 266
Rule 63
Rule 208
Rubi steps
\begin{align*} \int \frac{(A+B x) \sqrt{a+b x^2}}{x^3} \, dx &=-\frac{(A+2 B x) \sqrt{a+b x^2}}{2 x^2}-\frac{\int \frac{-2 a A b-4 a b B x}{x \sqrt{a+b x^2}} \, dx}{4 a}\\ &=-\frac{(A+2 B x) \sqrt{a+b x^2}}{2 x^2}+\frac{1}{2} (A b) \int \frac{1}{x \sqrt{a+b x^2}} \, dx+(b B) \int \frac{1}{\sqrt{a+b x^2}} \, dx\\ &=-\frac{(A+2 B x) \sqrt{a+b x^2}}{2 x^2}+\frac{1}{4} (A b) \operatorname{Subst}\left (\int \frac{1}{x \sqrt{a+b x}} \, dx,x,x^2\right )+(b B) \operatorname{Subst}\left (\int \frac{1}{1-b x^2} \, dx,x,\frac{x}{\sqrt{a+b x^2}}\right )\\ &=-\frac{(A+2 B x) \sqrt{a+b x^2}}{2 x^2}+\sqrt{b} B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )+\frac{1}{2} A \operatorname{Subst}\left (\int \frac{1}{-\frac{a}{b}+\frac{x^2}{b}} \, dx,x,\sqrt{a+b x^2}\right )\\ &=-\frac{(A+2 B x) \sqrt{a+b x^2}}{2 x^2}+\sqrt{b} B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )-\frac{A b \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )}{2 \sqrt{a}}\\ \end{align*}
Mathematica [A] time = 0.0911153, size = 108, normalized size = 1.35 \[ -\frac{\sqrt{a+b x^2} \left (a \sqrt{\frac{b x^2}{a}+1} (A+2 B x)+A b x^2 \tanh ^{-1}\left (\sqrt{\frac{b x^2}{a}+1}\right )-2 \sqrt{a} \sqrt{b} B x^2 \sinh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )\right )}{2 a x^2 \sqrt{\frac{b x^2}{a}+1}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.008, size = 121, normalized size = 1.5 \begin{align*} -{\frac{A}{2\,a{x}^{2}} \left ( b{x}^{2}+a \right ) ^{{\frac{3}{2}}}}-{\frac{Ab}{2}\ln \left ({\frac{1}{x} \left ( 2\,a+2\,\sqrt{a}\sqrt{b{x}^{2}+a} \right ) } \right ){\frac{1}{\sqrt{a}}}}+{\frac{Ab}{2\,a}\sqrt{b{x}^{2}+a}}-{\frac{B}{ax} \left ( b{x}^{2}+a \right ) ^{{\frac{3}{2}}}}+{\frac{bBx}{a}\sqrt{b{x}^{2}+a}}+B\sqrt{b}\ln \left ( x\sqrt{b}+\sqrt{b{x}^{2}+a} \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.62037, size = 934, normalized size = 11.68 \begin{align*} \left [\frac{2 \, B a \sqrt{b} x^{2} \log \left (-2 \, b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{b} x - a\right ) + A \sqrt{a} b x^{2} \log \left (-\frac{b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{a} + 2 \, a}{x^{2}}\right ) - 2 \,{\left (2 \, B a x + A a\right )} \sqrt{b x^{2} + a}}{4 \, a x^{2}}, -\frac{4 \, B a \sqrt{-b} x^{2} \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) - A \sqrt{a} b x^{2} \log \left (-\frac{b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{a} + 2 \, a}{x^{2}}\right ) + 2 \,{\left (2 \, B a x + A a\right )} \sqrt{b x^{2} + a}}{4 \, a x^{2}}, \frac{A \sqrt{-a} b x^{2} \arctan \left (\frac{\sqrt{-a}}{\sqrt{b x^{2} + a}}\right ) + B a \sqrt{b} x^{2} \log \left (-2 \, b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{b} x - a\right ) -{\left (2 \, B a x + A a\right )} \sqrt{b x^{2} + a}}{2 \, a x^{2}}, -\frac{2 \, B a \sqrt{-b} x^{2} \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) - A \sqrt{-a} b x^{2} \arctan \left (\frac{\sqrt{-a}}{\sqrt{b x^{2} + a}}\right ) +{\left (2 \, B a x + A a\right )} \sqrt{b x^{2} + a}}{2 \, a x^{2}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 3.75492, size = 107, normalized size = 1.34 \begin{align*} - \frac{A \sqrt{b} \sqrt{\frac{a}{b x^{2}} + 1}}{2 x} - \frac{A b \operatorname{asinh}{\left (\frac{\sqrt{a}}{\sqrt{b} x} \right )}}{2 \sqrt{a}} - \frac{B \sqrt{a}}{x \sqrt{1 + \frac{b x^{2}}{a}}} + B \sqrt{b} \operatorname{asinh}{\left (\frac{\sqrt{b} x}{\sqrt{a}} \right )} - \frac{B b x}{\sqrt{a} \sqrt{1 + \frac{b x^{2}}{a}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.22417, size = 220, normalized size = 2.75 \begin{align*} \frac{A b \arctan \left (-\frac{\sqrt{b} x - \sqrt{b x^{2} + a}}{\sqrt{-a}}\right )}{\sqrt{-a}} - B \sqrt{b} \log \left ({\left | -\sqrt{b} x + \sqrt{b x^{2} + a} \right |}\right ) + \frac{{\left (\sqrt{b} x - \sqrt{b x^{2} + a}\right )}^{3} A b + 2 \,{\left (\sqrt{b} x - \sqrt{b x^{2} + a}\right )}^{2} B a \sqrt{b} +{\left (\sqrt{b} x - \sqrt{b x^{2} + a}\right )} A a b - 2 \, B a^{2} \sqrt{b}}{{\left ({\left (\sqrt{b} x - \sqrt{b x^{2} + a}\right )}^{2} - a\right )}^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]